<?php
/**
 *   Joomdiet - administrator/components/com_joomdiet/views/editdietmanager/tmpl/default.php
 *   Author: Juan Dapena Paz (juan@bittingbits.com)
 *   Copyright (C) 2011 Bitting Bits S.L.
 *
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
defined('_JEXEC') or die('Restricted access');
?>
<form action="index.php" method="post" name="adminForm" enctype="multipart/form-data">
<input type="hidden" name="check" value="post" />
<div id="col100">
    <table cellspacing="0" cellpadding="0" border="0" width="100%">
        <tr><td align="top">
            <fieldset class="adminform">
                <legend><?php echo JText::_('COM_JOOMDIET_EDIT_DIET'); ?></legend>
                <input type="hidden" name="diet_id" id="diet_id" value="<?php echo $this->row->id; ?>" />
                <table class="adminform">
                    <tr>
                        <td width="100" align="right" class="key">
                            <label for="diet_name"><?php echo JText::_('COM_JOOMDIET_NAME'); ?></label>
                        </td>
                        <td>
                            <input class="text_area required" type="text" name="diet_name" id="diet_name" size="32" maxlength="220" value="<?php echo $this->row->name; ?>"/>
                        </td>
                    </tr>
                    <tr>
                        <td width="100" align="right" class="key">
                            <label for="diet_highlight"><?php echo JText::_('COM_JOOMDIET_HIGHLIGHTED'); ?></label>
                        </td>
                        <td>
                            <input class="text_area required" type="text" name="diet_highlight" id="diet_highlight" value="<?php echo $this->row->highlighted; ?>" />
                        </td>
                    </tr>
                    <tr>
                        <td width="100" align="right" class="key">
                            <label for="diet_description"><?php echo JText::_('COM_JOOMDIET_DESCRIPTION'); ?></label>
                        </td>
                        <td><?php
                            $editor =& JFactory::getEditor();
                            $params = array('smilies' => '0',
                                            'style' => '1',
                                            'layer' => '0',
                                            'table' => '0',
                                            'clear_entities' => '0',
                                            'toggle' => '0');
                            echo $editor->display('diet_description', $this->row->description, '600', '400', '40', '20', false, $params);
                        ?></td>
                    </tr>
                    <tr>
                        <td width="100" align="right" class="key">
                            <label for="dietfileurl"><?php echo JText::_('COM_JOOMDIET_FILE_URL'); ?></label>
                        </td>
                        <td>
                            <div><div><?php echo $this->row->file_url?JText::_('COM_JOOMDIET_ACTUAL_FILE').':'.$this->row->file_name:''; ?></div>
                            <div><input type="file" name="diet_file_url" id="diet_file_url" size="32"/></div></div>
                        </td>
                    </tr>
                </table>
            </fieldset>
        </td></tr>
    </table>
</div>
<input type="hidden" name="option" value="com_joomdiet" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="controller" value="dietmanager" />
</form>

